<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数式组件</title>
    <style>
        header{
            height:100px;
            background-color: #aef;
        }
        section{
            height:500px;
            background-color: #c9f;
        }
        footer{
            height: 100px;
            background-color: #c89;
        }
    </style>

</head>
<body>
    <div id="root"></div>
    <script src="../js/react.development.js"></script>
    <script src="../js/react-dom.development.js"></script>
    <script src="../js/babel.min.js"></script>

    <script type="text/babel">
        //函数式组件
        function Top(){
            return <header>头部</header>;
        }

        function Content(){
            return <section>内容区</section>;
        }

        function Bottom(){
            return <footer>尾部</footer>
        }

        function App(){
            return <div>
                <Top></Top>
                <Content></Content>
                <Bottom />
            </div>
        }
        
        ReactDOM.render(<App />, document.querySelector("#root"));
    </script>
</body>
</html>